package com.vancouver.knows.ui.activity.citydiscount;

import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.widget.ImageView;
import android.widget.TextView;

import com.google.zxing.BarcodeFormat;
import com.google.zxing.WriterException;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.qrcode.QRCodeWriter;
import com.pangu.util.DeviceUtil;
import com.vancouver.knows.R;
import com.vancouver.knows.ui.base.BaseActivity;
import com.vancouver.knows.util.AppUtils;

import butterknife.Bind;
import butterknife.OnClick;

/**
 * Created by llf on 2017/3/24.
 */

public class QrCodeBusinessActivity extends BaseActivity {

    @Bind(R.id.qr_code)
    ImageView qrCode;
    @Bind(R.id.close)
    ImageView close;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.view_business_qr);
        setViews();
    }

    private void setViews() {
        Intent intent = getIntent();
        String bitmapString = intent.getStringExtra("QR_CODE_BITMAP");
        Bitmap bitmapQrCode = AppUtils.convertStringToIcon(bitmapString);

        qrCode.setImageBitmap(bitmapQrCode);
    }

    @OnClick(R.id.close)
    public void OnCommonBackClick() {
        finish();
    }

}
